﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    Codebehind="RptSupplyStatistics.aspx.cs" Inherits="Ankin.EHBH.Web.Modules.Reports.RptSupplyStatistics"
    Title="医用耗材管理系统" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphcenter" runat="server">

    <script language="javascript" type="text/javascript" src="../../Public/My97DatePicker/WdatePicker.js"></script>

    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript"></script>

    <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td class="right-color">
                统计报告-明细统计报告</td>
        </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top: 14px;">
        <tr>
            <td class="bor bor-bg">
                统计条件
            </td>
        </tr>
        <tr>
            <td class="bor">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t1">
                    <tr>
                        <td style="width: 82px">
                            统计区间</td>
                        <td nowrap="nowrap" style="width: 227px">
                            <input id="inptStartDate" type="text" onclick="WdatePicker({maxDate:'%y-%M-%d'})"
                                runat="server" style="width: 95px" />
                            ～
                            <input id="inptEndDate" type="text" onclick="WdatePicker({maxDate:'%y-%M-%d'})" runat="server"
                                style="width: 95px" />
                        </td>
                        <td style="width: 82px">
                            领取部门</td>
                        <td style="width: 211px">
                            <asp:DropDownList ID="ddlDepart" runat="server" Width="190px">
                            </asp:DropDownList></td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 82px">
                            产品类别</td>
                        <td style="width: 227px">
                            <asp:DropDownList ID="ddlPrimClass" runat="server" Width="190px" AutoPostBack="True"
                                OnSelectedIndexChanged="ddlPrimClass_SelectedIndexChanged">
                            </asp:DropDownList></td>
                        <td style="width: 84px">
                            二级类别</td>
                        <td>
                            <asp:DropDownList ID="ddlSecClass" runat="server" Width="190px">
                            </asp:DropDownList>
                        </td>
                        <td align="right">
                            <asp:Button ID="btnViewRpt" runat="server" Text="查看报表" OnClick="btnViewRpt_Click"
                                CssClass="longbutton" /></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top: 14px;">
        <tr class="bor bor-bg">
            <td>
                统计报表
            </td>
        </tr>
        <tr>
            <td align="center" class="bor">
                <table id="Report" width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <asp:GridView ID="grvSplyStat" runat="server" Width="100%" AutoGenerateColumns="False"
                                EnableViewState="False">
                                <RowStyle CssClass="gv-first-line" />
                                <EmptyDataTemplate>
                                    <table width="100%" height="100">
                                        <tr>
                                            <td align="center" class="jg">
                                                对不起，没有找到任何相关记录
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                                <PagerStyle CssClass="fy" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="Black" />
                                <HeaderStyle CssClass="gv-head" />
                                <EditRowStyle BackColor="Black" />
                                <AlternatingRowStyle BackColor="White" />
                                <Columns>
                                    <asp:BoundField DataField="PRIMTYPE" HeaderText="产品类别" SortExpression="PRIMTYPE" />
                                    <asp:BoundField DataField="SECTYPE" HeaderText="二级类别" SortExpression="SECTYPE" />
                                    <asp:BoundField DataField="NAME" HeaderText="产品名称" SortExpression="NAME" />
                                    <asp:BoundField DataField="SPECS" HeaderText="规格型号" SortExpression="SPECS" />
                                    <asp:BoundField DataField="UNITS" HeaderText="单位" SortExpression="UNITS" />
                                    <asp:BoundField DataField="APPQTY" HeaderText="请领数量" SortExpression="APPQTY" />
                                    <asp:BoundField DataField="OBKQ" HeaderText="出库数量" SortExpression="OBKQ" />
                                    <asp:BoundField DataField="BBKQ" HeaderText="退回数量" SortExpression="BBKQ" />
                                    <asp:BoundField DataField="FBKQ" HeaderText="实际数量" SortExpression="FBKQ" />
                                    <asp:BoundField DataField="FPRC" HeaderText="金额" SortExpression="FPRC" DataFormatString="{0:N2}" />
                                </Columns>
                            </asp:GridView>
                            <CR:CrystalReportSource ID="crsSplyStat" runat="server">
                                <Report FileName="..\..\Repotrs\rptSupplyStatistics.rpt">
                                </Report>
                            </CR:CrystalReportSource>
                            <CR:CrystalReportViewer ID="crvSplyStat" runat="server" AutoDataBind="true" DisplayGroupTree="False"
                                DisplayToolbar="False" Height="50px" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnSaveToDt" runat="server" Text="导出数据" CssClass="longbutton" Visible="False" />
                        </td>
                    </tr>
                </table>
                <asp:Label ID="lblVaild" runat="server" ForeColor="Red"></asp:Label>
                <asp:HiddenField ID="hdfDept" runat="server" Value="All" />
                <asp:HiddenField ID="hdfPrimClass" runat="server" Value="All" />
                <asp:HiddenField ID="hdfSecClass" runat="server" Value="All" />
        </tr>
    </table>
    <div id="backgroundPopup">
    </div>
</asp:Content>
